package com.he.hsdyc.controller;

import com.he.hsdyc.service.ServiceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.UnsupportedEncodingException;


@RestController
@RequestMapping(value = "/push")
public class PushController {

    @Autowired
    private ServiceService serviceService;

    @RequestMapping(value = "/communicatePush")
    public  void  communicatePush(String stuName, Long stuId, String publishName, Long communicateId){
        try {
            serviceService.communicatePush(stuName,stuId,publishName,communicateId);
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
    }


    @RequestMapping(value = "/communicatePushMini")
    public  void  communicatePushMini(String stuName, Long stuId, String openId,String publishName, Long communicateId){
        try {
            serviceService.communicatePushMini(stuName,stuId,openId,publishName,communicateId);
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
    }

}
